package com.example.ixform.services;

import com.example.ixform.dao.CommentRepository;
import com.example.ixform.entities.Comment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CommentService {
    @Autowired
    CommentRepository commentRepository;

    public List<Comment> getAll(){
        return commentRepository.findAll();
    }
    public Comment save(Comment comment){
        return commentRepository.save(comment);
    }
}
